package com.otaku.adapter;

import java.util.ArrayList;
import java.util.List;

import com.otaku.crawler.bean.BaseBean;
import com.otaku.crawler.model.MTimePojo;
import com.otaku.crawler.util.Constants;

public final class BaseBeanAdapter {
	private BaseBeanAdapter(){}
	
	public static BaseBean from(MTimePojo mt){
		return new BaseBean(0, "电影", mt.getIntroduction(), mt.getLocation(), mt.getLat(),mt.getLng(), mt.getImg_src(), 
				mt.getInformation(), "0",mt.getUrl(), "MTime时光网", 
				"0", "电影 MTime", Constants.getTodayTime(), null, mt.getCity(), mt.getPhone(), null);
	}
	
	public static List<BaseBean> from(List<MTimePojo> mtl){
		List<BaseBean> bbl = new ArrayList<BaseBean>();
		for(MTimePojo mt : mtl)
			bbl.add(from(mt));
		
		return bbl;
	}
}
